Update child layout selector to match core.#61777
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/block-supports/layout.php ❔ phpunit/block-supports/layout-test.php |
andrewserong
left a comment
There was a problem hiding this comment.
Working nicely. LGTM! 🚀
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
What?
Syncing a change that was made in the core sync PR for grid and column spans.
Using
wp_unique_idto generate the child layout classname number means that number will vary depending on how many timeswp_unique_idhas been used on the page before. This was causing the results of the test added in #61392 to be unpredictable, and also the classname of any given block on a page to be unpredictable, which could affect things like dynamic loading (see #55416).This PR changes the child layout classname to use
wp_unique_prefixed_idinstead.Testing Instructions
Nothing should have visibly changed, but if you
wp-container-content-1(in trunk it'll bewp-container-content-2because the duotone filter also useswp_unique_id).Testing Instructions for Keyboard
Screenshots or screencast